package com.gss.armory.validator;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;
import org.springframework.validation.Errors;
import org.springframework.validation.FieldError;
import com.gss.armory.form.DocumentWorkFlowForm;

@Component
public class DocumentWorkFlowFormValidator {
	Logger logger =Logger.getLogger(DocumentWorkFlowFormValidator.class);
	public void validateSubmitInWF(DocumentWorkFlowForm documentWorkFlowForm, Errors errors)
	{
		logger.debug("inside method validateUploadNewDoc");
		documentWorkFlowForm.setIntErrorCount(errors.getErrorCount());
		logger.debug("number of binding errors: " + errors.getErrorCount());
		for(FieldError fieldError : errors.getFieldErrors()){
			logger.debug(fieldError.toString());
		}
		
	}
}
